<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>Pager.class.js"></script>
<script type="text/javascript">
var pager = new Pager();
pager.model = "?m=sale&c=contractmanage";
pager.nid = "contract_id";
function init_page(){
	var url = window.location.pathname;
	$.ajax({
		url:url+'?'+set_ajx_url('m=sale&c=contractmanage&a=ajx_init'),
		data:'', 
		type:'post',
		dataType:'json',
		success:function(data){
		pager.setEdit();
		pager.setDel();		
		$('#main_tbody').html(pager.getPageTable(data["page_head"],data["page_data"]));
		$('.main_foot_wraper').html(pager.getPageState(data["page_state"]));
		}
	});
}
</script>
<body onLoad="init_page()"> 
<div class="main_head">
		<span class="main_head_title">合同管理</span>	
		<a href="?m=sale&c=contractmanage&a=add"><span class="main_head_btn">新&nbsp;&nbsp;增</span></a>	
</div>

<div class="search_frame">
	<div class="search_Within">
		<div class="search_radio_box">
			<img src="images/search.gif" width="43" height="28" class="search_ico"/>
		</div>
		<div class="search_form_left">
			<div class="search_form_text">合同名称：</div>
			<div class="search_input_left"><input name="textfield" type="text" class="txt" id="_con_contract_name"/></div>
			<div class="search_form_text">类型：</div>
			<div class="search_input_left">
			<select id="_con_contract_type" class="select">
			<option value=""></option>
            <?php            
            	foreach ($option_cache['contract_type']  as $key => $value) {
            ?>
			<option value="<?php echo $key?>"><?php echo $value?></option>
			<?php 
            	}
			?>
			</select></div>
			
            
		</div>
		<div class="search_btn"><input name="dosubmit" type="submit" class="search_btn_a" value=" 查询 " onClick="pager.search()"/></div>
    </div>
</div>

<div class="main_wraper">
<table border="0" cellpadding="0" cellspacing="0" class="main_table">
	<thead>
		<tr class="main_table_header">
			<th width="4%">序号</th>
			<th width="14%">合同号</th>
			<th width="5%">合同名称</th>
			<th width="12%">付款方式</th>
			<th width="12%">交易额</th>
			<th width="15%">分类</th>
			<th width="10%" colspan=2>操作</th>						
		</tr>
	</thead>
	<tbody id = "main_tbody">
	
	</tbody>
</table>
</div>
<div class="main_foot_wraper">

</div>

</body>
</html>